package com.twu.biblioteca.login;

import com.twu.biblioteca.options.CheckMembershipDetails;
import com.twu.biblioteca.options.Option;
import com.twu.biblioteca.options.ReserveBook;

import java.util.ArrayList;

public class LoginInterceptorMatcher {
    ArrayList<Class> needLoginOptions = new ArrayList<Class>();

    public LoginInterceptorMatcher() {
        needLoginOptions.add(CheckMembershipDetails.class);
        needLoginOptions.add(ReserveBook.class);
    }

    public boolean matches(Option option) {
        return needLoginOptions.contains(option.getClass());
    }
}
